USE [BusSystem]
GO

/****** Object:  Table [dbo].[Bus_BusApply]    Script Date: 05/23/2010 23:57:58 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Bus_BusApply](
	[RecID] [int] IDENTITY(1,1) NOT NULL,
	[DocID] [varchar](20) NOT NULL,
	[BusID] [varchar](20) NOT NULL,
	[Applyer] [varchar](20) NULL,
	[ApplyDate] [smalldatetime] NOT NULL,
	[DriveTo] [varchar](20) NULL,
	[WorkTaskID] [varchar](20) NULL,
	[WorkTaskDesc] [nvarchar](50) NULL,
	[PlanToTime] [smalldatetime] NULL,
	[PlanBackTime] [smalldatetime] NULL,
	[ApprovedBy] [varchar](20) NULL,
	[ApprovedNote] [nvarchar](50) NULL,
	[RecDivID] [varchar](20) NULL,
	[RecAcct] [varchar](20) NULL,
	[RecDate] [smalldatetime] NULL,
	[CFM] [bit] NOT NULL,
	[CFMAcct] [varchar](20) NULL,
	[CFMDate] [smalldatetime] NULL,
	[Void] [bit] NOT NULL,
	[VoidAcct] [varchar](20) NULL,
	[VoidDate] [smalldatetime] NULL,
	[UserAcct] [varchar](20) NULL,
	[LastUpdateDate] [smalldatetime] NOT NULL,
 CONSTRAINT [PK_Bus_BusApply] PRIMARY KEY NONCLUSTERED 
(
	[DocID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Bus_BusApply] ADD  DEFAULT ((0)) FOR [CFM]
GO

ALTER TABLE [dbo].[Bus_BusApply] ADD  DEFAULT ((0)) FOR [Void]
GO


